package com.kipling.kio.demo.server.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alibaba.fastjson.JSON;
import com.kipling.kio.core.intf.Packet;
import com.kipling.kio.demo.common.intf.AbsShowcaseBsHandler;
import com.kipling.kio.demo.common.packets.PushMsgReqBody;
import com.kipling.kio.server.ServerGroupContext;

public class PushMsgReqHandler extends AbsShowcaseBsHandler<PushMsgReqBody> {
	private static Logger log = LoggerFactory.getLogger(PushMsgReqHandler.class);

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

	@Override
	public Class<PushMsgReqBody> bodyClass() {
		// TODO Auto-generated method stub
		return PushMsgReqBody.class;
	}

	@Override
	public Object handler(Packet packet, PushMsgReqBody bsBody,ServerGroupContext<Packet, Object> serverGroupContext)
			throws Exception {
		if(packet!=null){
			System.out.println("PushMsgReqHandler.handler:packet."+JSON.toJSON(packet));
			System.out.println("userid:"+packet.getUserid());			
		}
		if(bsBody!=null){
			System.out.println("bsBody."+JSON.toJSON(bsBody));
		}
		
		
		return null;
	}



}
